//
//  DataBaseHandle.h
//  Alltelevisionnews
//
//  Created by dllo on 15/12/5.
//  Copyright © 2015年 三人行. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
#import "baseDataModel.h"

typedef NS_ENUM(NSUInteger, SelectbaseDataModel) {
    Intable,
    NotInTable,
    SelectError,
};


@interface DataBaseHandle : NSObject

{
    sqlite3 *dbpoint;
}

+ (instancetype)shareDataBasaHandle;

//打开
-(void)openDB;

// 创建
-(void)createTable;

// 搜索方法
- (SelectbaseDataModel)isHaveInTable:(baseDataModel *)model;

// 收藏
- (void)saveNewsInDB:(baseDataModel *)model;

// 删除
- (void)deleteNewsInDB:(baseDataModel *)model;

//// 查找全部
- (NSMutableArray *)selectArrNews;



@end
